package JavaQuestions;

import java.util.*;
import java.awt.Point;

/**
 * TODO Put here a description of what this class does.
 *
 * @author jh238d.
 *         Created Mar 19, 2012.
 */
public class haha 
{
	ArrayList<Point> current_path;
	int size;
	public haha(int n)
	{
		this.current_path = new ArrayList<Point>();
		this.size = n - 1;
	}
	
	public void getPath(int i, int j)
	{
		Point p = new Point(i,j);
		this.current_path.add(p);
		
		if(i>this.size||j>this.size)
		{
			this.current_path.remove(p);
			return;
		}
		
		if(i==this.size && j==this.size)
		{
			System.out.println(this.current_path);
			this.current_path.remove(p);
			return;
		}
		
		getPath(i+1,j);
		getPath(i,j+1);
		this.current_path.remove(p);
		
		return;
	}
	
	public static void main(String[] arg)
	{
		int n = 4;
		haha h = new haha(n);
		h.getPath(0,0);
	}
}


